Optimal. Leaf size=146 \[ -\frac{i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{3/2}}+\frac{5 i a}{12 d (a+i a \tan (c+d x))^{3/2}}+\frac{5 i}{8 d \sqrt{a+i a \tan (c+d x)}}-\frac{5 i \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{8 \sqrt{2} \sqrt{a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0981909, antiderivative size = 146, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3487, 51, 63, 206} \[ -\frac{i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{3/2}}+\frac{5 i a}{12 d (a+i a \tan (c+d x))^{3/2}}+\frac{5 i}{8 d \sqrt{a+i a \tan (c+d x)}}-\frac{5 i \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{8 \sqrt{2} \sqrt{a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3487
Rule 51
Rule 63
Rule 206
Rubi steps
\begin{align*} \int \frac{\cos ^2(c+d x)}{\sqrt{a+i a \tan (c+d x)}} \, dx &=-\frac{\left (i a^3\right ) \operatorname{Subst}\left (\int \frac{1}{(a-x)^2 (a+x)^{5/2}} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac{i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{3/2}}-\frac{\left (5 i a^2\right ) \operatorname{Subst}\left (\int \frac{1}{(a-x) (a+x)^{5/2}} \, dx,x,i a \tan (c+d x)\right )}{4 d}\\ &=\frac{5 i a}{12 d (a+i a \tan (c+d x))^{3/2}}-\frac{i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{3/2}}-\frac{(5 i a) \operatorname{Subst}\left (\int \frac{1}{(a-x) (a+x)^{3/2}} \, dx,x,i a \tan (c+d x)\right )}{8 d}\\ &=\frac{5 i a}{12 d (a+i a \tan (c+d x))^{3/2}}-\frac{i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{3/2}}+\frac{5 i}{8 d \sqrt{a+i a \tan (c+d x)}}-\frac{(5 i) \operatorname{Subst}\left (\int \frac{1}{(a-x) \sqrt{a+x}} \, dx,x,i a \tan (c+d x)\right )}{16 d}\\ &=\frac{5 i a}{12 d (a+i a \tan (c+d x))^{3/2}}-\frac{i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{3/2}}+\frac{5 i}{8 d \sqrt{a+i a \tan (c+d x)}}-\frac{(5 i) \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\sqrt{a+i a \tan (c+d x)}\right )}{8 d}\\ &=-\frac{5 i \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{8 \sqrt{2} \sqrt{a} d}+\frac{5 i a}{12 d (a+i a \tan (c+d x))^{3/2}}-\frac{i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{3/2}}+\frac{5 i}{8 d \sqrt{a+i a \tan (c+d x)}}\\ \end{align*}
Mathematica [A] time = 0.4769, size = 126, normalized size = 0.86 \[ -\frac{i e^{-2 i (c+d x)} \left (\sqrt{1+e^{2 i (c+d x)}} \left (-14 e^{2 i (c+d x)}+3 e^{4 i (c+d x)}-2\right )+15 e^{3 i (c+d x)} \sinh ^{-1}\left (e^{i (c+d x)}\right )\right )}{24 d \sqrt{1+e^{2 i (c+d x)}} \sqrt{a+i a \tan (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.334, size = 341, normalized size = 2.3 \begin{align*}{\frac{1}{96\,ad}\sqrt{{\frac{a \left ( i\sin \left ( dx+c \right ) +\cos \left ( dx+c \right ) \right ) }{\cos \left ( dx+c \right ) }}} \left ( 15\,i\sqrt{2}\arctan \left ({\frac{\sqrt{2} \left ( i\cos \left ( dx+c \right ) -i-\sin \left ( dx+c \right ) \right ) }{2\,\sin \left ( dx+c \right ) }{\frac{1}{\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}}}} \right ) \sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\cos \left ( dx+c \right ) +32\,i \left ( \cos \left ( dx+c \right ) \right ) ^{4}+15\,i\sqrt{2}\arctan \left ({\frac{\sqrt{2} \left ( i\cos \left ( dx+c \right ) -i-\sin \left ( dx+c \right ) \right ) }{2\,\sin \left ( dx+c \right ) }{\frac{1}{\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}}}} \right ) \sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}+15\,\sqrt{2}\arctan \left ( 1/2\,{\frac{\sqrt{2} \left ( i\cos \left ( dx+c \right ) -i-\sin \left ( dx+c \right ) \right ) }{\sin \left ( dx+c \right ) }{\frac{1}{\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}}}} \right ) \sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\sin \left ( dx+c \right ) +32\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}\sin \left ( dx+c \right ) +20\,i \left ( \cos \left ( dx+c \right ) \right ) ^{2}+60\,\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.46901, size = 837, normalized size = 5.73 \begin{align*} \frac{{\left (-15 i \, \sqrt{\frac{1}{2}} a d \sqrt{\frac{1}{a d^{2}}} e^{\left (4 i \, d x + 4 i \, c\right )} \log \left ({\left (2 \, \sqrt{\frac{1}{2}} a d \sqrt{\frac{1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + 15 i \, \sqrt{\frac{1}{2}} a d \sqrt{\frac{1}{a d^{2}}} e^{\left (4 i \, d x + 4 i \, c\right )} \log \left (-{\left (2 \, \sqrt{\frac{1}{2}} a d \sqrt{\frac{1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} - \sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + \sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}{\left (-3 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 11 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 16 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 2 i\right )} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-4 i \, d x - 4 i \, c\right )}}{48 \, a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos ^{2}{\left (c + d x \right )}}{\sqrt{a \left (i \tan{\left (c + d x \right )} + 1\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (d x + c\right )^{2}}{\sqrt{i \, a \tan \left (d x + c\right ) + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]